﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Host.Domain
{
    /// <summary>
    /// 报警信息表
    /// </summary>
    public  class Alarms
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [Key]
        public int AlarmId { get; set; }
        /// <summary>
        /// 设备外键
        /// </summary>
        public int DeviceId { get; set; }
        /// <summary>
        /// 报警类型 1=设备故障 2=参数超限
        /// </summary>
        public int AlarmType { get; set; }
        /// <summary>
        /// 报警级别 1=低, 2=中, 3=高
        /// </summary>
        public int Severity { get; set; }
        /// <summary>
        /// 报警描述
        /// </summary>
        public string AlarmDescription{ get; set; }
        /// <summary>
        /// 报警发生的时间
        /// </summary>
        public DateTime AlarmStartTime { get; set; }
        /// <summary>
        /// 报警解除的时间
        /// </summary>
        public DateTime? AlarmEndTime { get; set; }
        /// <summary>
        /// 报警是否已被处理 或者确认
        /// </summary>
        public bool IsAcknowledge {  get; set; }
        /// <summary>
        /// 101 代表“循环变频故障”，102 代表“补水变频故障”
        /// </summary>
        public int FaultCode { get; set; }
    }
}
